26 research outputs found

    Inner Classes and Virtual Types

    Get PDF
    This paper studies the interplay between inner classes and virtual types. The combination of these two concepts can be observed in object-oriented languages like Beta or Scala. This study is based on a calculus of classes and objects composed of a very limited number of constructs. For example the calculus has neither methods nor class constructors. Instead it has a more general concept of abstract inheritance which lets a class extend an arbitrary object. Thanks to an interpretation of terms as types the calculus also unifies type fields and term fields. The main contribution of this work is to show that typing virtual types in the presence of inner classes requires some kind of alias analysis and to formalize this mechanism with a simple calculus

    PiLib: A Hosted Language for Pi-Calculus Style Concurrency

    Get PDF
    PiLib is a library written in Scala that implements the concurrency constructs of the Pi-calculus. Some features of the programming language Scala, examined in the paper, make it possible to use almost the same syntax as in the Pi-calculus. The advantages of this library with respect to a simple Pi-calculus interpreter are that we can transmit any value along names, we can get control over them using the type system, and we have access to the full power of Scala in terms of expressiveness and libraries

    An Equational Theory for Transactions

    Get PDF
    Transactions are commonly described as being ACID: All-or-nothing, Consistent, Isolated and Durable. However, although these words convey a powerful intuition, the ACID properties have never been given a precise semantics in a way that disentangles each property from the others. Among the benefits of such a semantics would be the ability to trade-off the value of a property against the cost of its implementation. This paper gives a sound equational semantics for the transaction properties. We define three categories of actions, A-actions, I-actions and D-actions, while we view Consistency as an induction rule that enables us to derive system-wide consistency from local consistency. The three kinds of action can be nested, leading to different forms of transactions, each with a well-defined semantics. Conventional transactions are obtained as ADI-actions. >From the equational semantics we develop a formal proof principle for transactional programs, from which we derive the induction rule for Consistency

    A Nominal Theory of Objects with Dependent Types

    Get PDF
    We design and study newObj, a calculus and dependent type system forobjects and classes which can have types as members. Type members canbe aliases, abstract types, or new types. The type system can modelthe essential concepts of Java's inner classes as well as virtual typesand family polymorphism found in BETA or gbeta. It can also model mostconcepts of SML-style module systems, including sharing constraintsand higher-order functors, but excluding applicative functors.The type system can thus be used as a basis for unifying conceptsthat so far existed in parallel in advanced object systems and inmodule systems. The technical report presents results on confluenceof the calculus, soundness of the type system, and undecidability oftype checking

    An Overview of the Scala Programming Language

    Get PDF
    Scala fuses object-oriented and functional programming in a statically typed programming language. It is aimed at the construction of components and component systems. This paper gives an overview of the Scala language for readers who are familar with programming methods and programming language design

    An Overview of the Scala Programming Language (2. Edition)

    Get PDF
    Scala fuses object-oriented and functional programming in a statically typed programming language. It is aimed at the construction of components and component systems. This paper gives an overview of the Scala language for readers who are familar with programming methods and programming language design

    Foundations for Scala: Semantics and Proof of Virtual Types

    Get PDF
    SCALA is an attractive programming language because it is both very expressive and statically strongly typed. This marriage against nature comes at the price of a certain complexity in the language constructs and the static analysis. This complexity makes type safety unclear. The goal of this thesis is to initiate a rigorous and formal process of validation of the SCALA type system. The correctness of a type system can only be established in relation to a formal description of a program execution. The first contribution of this thesis is the definition of a formal semantics for SCALA, by translation in a minimal class-based calculus. SCALA offers two means for expressing type abstraction: type parameters and type members, also called virtual types. Virtual types seem more primitive since they allow to encode type parameters whereas the existence of a reverse encoding is not clear. The soundness of virtual types has been the object of a long debate in the community; they are now commonly believed to be safe, but at this time, there exists no formal argument that would confirm this belief. The second contribution of this thesis is to provide a formal proof of type safety for virtual types
    corecore